<%@ page contentType="text/html;charset=UTF-8"%>

<header>
	<div class="container">
		<div class="row-fluid">
			<div class="span12">
				<div class="span4">
					<blockquote>
					  	<h3 style="line-height: 18px;"><a href="${ctx}/">悠<span style="font-weight: normal;font-size: 12px;">er</span></a>&nbsp;<span style="font-weight: normal;font-size: 12px;color:#999;"> 属于你自己的生活杂志</span></h3>
						<small>微风拂过刘海，吹散了眉间的烦恼。</small>
					</blockquote>
				</div>
				<div class="span8">
					<ul class="nav nav-pills pull-right">
						<li><a href="${ctx}/"
							<c:if test="${cur == 'home' || cur == null || empty cur}">class="selected"</c:if>>首页</a>
						</li>
						<li><a href="${ctx}/article/add" <c:if test="${cur == 'add'}">class="selected"</c:if>>发文</a></li>
						<li><a href="${ctx}/people" <c:if test="${cur == 'people'}">class="selected"</c:if>>大家</a></li>
						<shiro:authenticated>
							<li class="dropdown">
								<a class="dropdown-toggle" data-toggle="dropdown" href="#"> 
									<c:choose>
										<c:when test="${currentUser.picSet == false}">
											<img src="${ctx}/res/imgs/default_portrait.png" class="thumb thumb_20" />
										</c:when>
										<c:otherwise>
											<c:url var="profilePicUrl" value="/img/u/s/${currentUser.id}.jpg" />
											<img src="${profilePicUrl}" class="thumb thumb_20" />
										</c:otherwise>
									</c:choose>
								</a>
								<ul class="dropdown-menu">
									<li>
										<a href="${ctx}/u/${currentUser.id}">我的生活</a>
									</li>
									<li>
										<a href="${ctx}/account/settings/profile">我的帐号</a>
									</li>
									<li>
										<a href="${ctx}/logout">登出</a>
									</li>
								</ul>
							</li>
						</shiro:authenticated>
						<shiro:guest>
							<li>
								<c:choose>
									<c:when test="${cur == 'login'}">
										<a href="${ctx}/signup">注册</a>
									</c:when>
									<c:otherwise>
										<a href="${ctx}/login">登录</a>
									</c:otherwise>
								</c:choose>
							</li>
						</shiro:guest>
					</ul>
				</div>
			</div>
		</div>
		
		<%-- <h1 class="logoText pull-left">
			
			<a href="${ctx}/">悠儿</a> <span class="headerText">微风拂过刘海，吹散了眉间的烦恼。</span>
		</h1>
		<span class="pull-right">
			<ul class="nav nav-pills">
				<li><a href="${ctx}/"
					<c:if test="${cur == 'home' || cur == null || empty cur}">class="selected"</c:if>>首页</a>
				</li>
				<li><a href="${ctx}/topic/add" <c:if test="${cur == 'add'}">class="selected"</c:if>>发文</a></li>
				<li><a href="${ctx}/people" <c:if test="${cur == 'people'}">class="selected"</c:if>>大家</a></li>
				<shiro:authenticated>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="dropdown" href="#"> 
							<c:choose>
								<c:when test="${currentUser.picSet == false}">
									<img src="${ctx}/res/imgs/default_portrait.png" class="thumb thumb_20" />
								</c:when>
								<c:otherwise>
									<c:url var="profilePicUrl" value="/img/u/s/${currentUser.id}.jpg" />
									<img src="${profilePicUrl}" class="thumb thumb_20" />
								</c:otherwise>
							</c:choose>
						</a>
						<ul class="dropdown-menu">
							<li>
								<a href="${ctx}/u/${currentUser.id}">我的生活</a>
							</li>
							<li>
								<a href="${ctx}/account/settings/profile">我的帐号</a>
							</li>
							<li>
								<a href="${ctx}/logout">登出</a>
							</li>
						</ul>
					</li>
				</shiro:authenticated>
				<shiro:guest>
					<li>
						<c:choose>
							<c:when test="${cur == 'login'}">
								<a href="${ctx}/signup">注册</a>
							</c:when>
							<c:otherwise>
								<a href="${ctx}/login">登录</a>
							</c:otherwise>
						</c:choose>
					</li>
				</shiro:guest>
			</ul>
		</span> --%>
	</div>
</header>